import Vue from 'vue'
import VueRouter from 'vue-router'
import Layout from '@/views/layout.vue'
import Article from '@/views/article.vue'
import News from '@/views/news.vue'
import User from '@/views/user.vue'
import Find from '@/views/find.vue'
import Diqu from '@/views/diqu.vue'

Vue.use(VueRouter)

// const routes = []

const router = new VueRouter({
  routes: [
    {
      path: '/',
      component: Layout,
      redirect: '/article',
      children: [
        { path: '/article', component: Article },
        { path: '/find', component: Find },
        { path: '/news', component: News },
        { path: '/user', component: User }
      ]
    },
    { path: '/diqu', component: Diqu }
  ]
})

export default router
